home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmMovie
- BackColor = &H00FFFFFF&
- Caption = "The Movie Program"
- ClientHeight = 4020
- ClientLeft = 1845
- ClientTop = 1605
- ClientWidth = 3510
- Height = 4425
- Icon = MCARTHUR.FRX:0000
- Left = 1785
- LinkTopic = "Form1"
- ScaleHeight = 4020
- ScaleWidth = 3510
- Top = 1260
- Width = 3630
- Begin HScrollBar hsbPosition
- Height = 255
- Left = 0
- TabIndex = 4
- Top = 3240
- Width = 3510
- End
- Begin CommandButton cmdExit
- Caption = "E&xit"
- Height = 375
- Left = 2520
- TabIndex = 3
- Top = 3600
- Width = 975
- End
- Begin CheckBox chkSilent
- Caption = "&Silent"
- Height = 255
- Left = 1560
- TabIndex = 2
- Top = 3600
- Width = 800
- End
- Begin CheckBox chkAutoRepeat
- Caption = "&Auto Repeat"
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 3600
- Width = 1335
- End
- Begin TEGOMM TegommAvi
- BorderStyle = 0 'None
- DeviceType = ""
- FileName = ""
- Height = 495
- Left = 0
- pcSpeed = 100
- pcTaskInterval = 0
- RecordMode = 0 'Insert
- Shareable = 0 'False
- Silent = 0 'False
- TabIndex = 0
- Tempo = 0
- Top = 2640
- UpdateInterval = 0
- Width = 3510
- End
- ' Force variables declarations.
- Option Explicit
- Sub chkSilent_Click ()
- ' If the Silent check box is checked, make the movie
- ' a silent movie.
- If chkSilent.Value = 1 Then
- TegommAvi.Silent = True
- Else
- TegommAvi.Silent = False
- End If
- End Sub
- Sub cmdExit_Click ()
- End
- End Sub
- Sub Form_Load ()
- Dim AviFile
-
- ' Set the DeviceType for playback of AVI files.
- TegommAvi.DeviceType = "AVIVideo"
- ' Set the Filename.
- AviFile = Left(APP.Path, 2) + "\MVPROG\AVI\MCARTHUR.AVI"
- TegommAvi.FileName = AviFile
- ' Movie should play inside application's window.
- TegommAvi.hWndDisplay = frmMovie.hWnd
- ' Issue an Open command.
- TegommAvi.Command = "Open"
- ' If Open command failed, display error message.
- If TegommAvi.Error <> 0 Then
- MsgBox "Unable to open " + AviFile, 0, "ERROR"
- End If
- ' Set the Time Format of the multimedia control
- ' to units of frames.
- TegommAvi.TimeFormat = "frames"
- ' Set the minimum value of the scroll bar.
- hsbPosition.Min = 0
- ' Set the maximum value of the scroll bar.
- hsbPosition.Max = TegommAvi.Length
- ' Set the timer interval of the multimedia control
- ' to 100 milliseconds.
- TegommAvi.UpdateInterval = 100
- End Sub
- Sub Form_Paint ()
- ' Issue a Repaint command to the multimedia control.
- TegommAvi.Command = "Repaint"
- End Sub
- Sub hsbPosition_Change ()
- ' Change the playback position according to
- ' the scroll bar position, provided that the
- ' multimedia control is either stopped or paused.
- If TegommAvi.Mode = 525 Or TegommAvi.Mode = 529 Then
- TegommAvi.To = hsbPosition.Value
- TegommAvi.Command = "Seek"
- End If
- End Sub
- Sub hsbPosition_Scroll ()
- ' Call the hsbPosition_Change() procedure.
- hsbPosition_Change
- End Sub
- Sub TegommAvi_Done ()
- ' Playback reached the end of the file?
- If TegommAvi.Position = TegommAvi.Length Then
-
- ' Rewind the playback position to start of file.
- TegommAvi.Command = "Prev"
-
- ' If Auto Repeat check box is checked, play again.
- If chkAutoRepeat.Value = 1 Then
- TegommAvi.Command = "Play"
- End If
- End If
- End Sub
- Sub TegommAvi_StatusUpdate ()
- ' Update the scroll bar with the current
- ' playback position.
- hsbPosition.Value = TegommAvi.Position
- End Sub
-